#!/bin/sh

info='
   mcsrpbe_direct_sym
   -------------
   Molecule:         Be  
   Wave Function:    srDFT MC-srPBE (mu=0.4)    
   Test Purpose:     Check srPBE functional at the (long-range) MCSCF level w/symmetry and AO direct.
                     Basis : cc-pVDZ
'

molecule='BASIS
cc-pVDZ
Be
atom 
    1  0 3X  Y  Z     0.10D-14
        4.    1
Be     0.0000000000000000  0.0000000000000000  0.00000
'

dalton='**DALTON INPUT
.DIRECT
.RUN WAVE 
**WAVE FUNCTIONS
.HFSRDFT
.MCSRDFT
.SRFUN
SRXPBEHSE SRCPBERI
*SCF INPUT
.THRESHOLD
1.d-6
.DOUBLY OCCUPIED
2 0 0 0 0 0 0 0
*ORBITAL INPUT
.MOSTART
 H1DIAG
*CI INPUT
.STATE
1 
.MAX ITERATION
 60
*CI VECTOR
*CONFIGURATION INPUT
.SYMMETRI
1
.SPIN MUL
1
.INACTIVE
1 0 0 0 0 0 0 0
.CAS SPACE
2 1 1 0 0 0 0 0
.ELECTRONS
2
*OPTIMIZATION
.MAX MACRO
40
.THRESHOLD
1.d-6
*ORBITAL INPUT
.NOSUPSYM
**INTEGRALS
.NOSUP
*TWOINT
.DOSRIN
.ERF
0.4
**END OF INPUT
'

test='
check_scf_energy MC-SRDFT -14.627307555965 5e-9
'                    

. ./functions || { echo "'functions' library not found." ; exit 1; }
check_gen_input "$0" "$info" "$molecule" "$dalton" "$test"
